ci: lint/type/test floor + dataset & eval-baseline gates (Milestone A)#5
Merged
Conversation
This was referenced Jun 25, 2026
Close the CI/CD gap so dikw-data has the same deterministic floor as dikw-core before Phase 1 dataset construction begins. - pyproject: ruff + mypy (strict) config, mirroring dikw-core; ignore RUF001/2/3 (false positives on this bilingual zh/en codebase's embedded CJK text) and scope-ignore E702 to the one procedural-pictogram generator. - .pre-commit-config.yaml: local ruff + mypy hooks (uv run), matching CI. - .github/workflows/ci.yml: uv sync -> ruff -> mypy src -> pytest -> validate every dataset (shape gate, $0, no provider keys). Matrix 3.12/3.13. - .github/workflows/eval-gate.yml + tools/check_baselines.py: a dataset change (datasets/**) must land a new dated reports/BASELINES.md entry naming a retrieval metric; override with the `no-baseline-needed` label. Unit-tested. - .gitignore: track reports/BASELINES.md (the baseline log) while keeping per-run artifacts ignored; ignore .impeccable/. - Apply ruff autofixes (import sorting, unused-import / whitespace cleanup) across scripts/, src/, web/, tests/ so the existing tree passes the new gate. Fix 3 real lint findings (RUF005 in run_eval.py, dead code in generate_queries_local) and 2 mypy findings (unused ignore; int**int Any-widening in llm_client). All green locally: ruff clean, mypy clean, 50 tests pass, 3 datasets validate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
72527bd to
6d62374
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes the CI/CD gap in
dikw-dataso it has the same deterministic floor asdikw-core, before Phase 1 dataset construction begins. This is Milestone A of the eval-plan Phase 0→1 work (seedocs/dikw-eval-plan.md); the public-anchor calibration (scifact/cmteb) follows as Milestone B.Changes
pyproject.toml— ruff + mypy (strict) config mirroring dikw-core. IgnoresRUF001/2/3(ambiguous-unicode false positives on this bilingual zh/en codebase's embedded CJK text) and scope-ignoresE702to the one procedural-pictogram generator..pre-commit-config.yaml— local ruff + mypy hooks (uv run), matching CI. Install withuv run pre-commit install..github/workflows/ci.yml—uv sync→ ruff →mypy src→ pytest → validate every dataset (shape gate, $0, no provider keys). Matrix 3.12 / 3.13..github/workflows/eval-gate.yml+tools/check_baselines.py— adatasets/**change must land a new datedreports/BASELINES.mdentry naming a retrieval metric; override with theno-baseline-neededlabel. The pure check is unit-tested (tests/test_check_baselines.py)..gitignore— trackreports/BASELINES.md(the baseline log) while keeping per-run artifacts ignored; ignore.impeccable/.scripts/,src/,web/,tests/so the existing tree passes the new gate. Fixed 3 real lint findings (RUF005 inrun_eval.py, dead code ingenerate_queries_local.py) and 2 mypy findings (unused ignore;int**intAny-widening inllm_client.py).Verification (local)
uv run ruff check .→ cleanuv run mypy src→ cleanuv run pytest→ 50 passedscripts/validate_dataset.pyover all 3 datasets → valid🤖 Generated with Claude Code